import axios from "@/utils/request";

export function addClass(params){
    return axios({
        method:"post",
        url:"/classes",
        data:params
    })
}

export function deleteClass(params){
    return axios({
        method:"delete",
        url:"/classes",
        data:params
    })
}

export function updateClass(params){
    return axios({
        method:"put",
        url:"/classes",
        data:params
    })
}

export function selectClass(params){
    return axios({
        method:"get",
        url:"/classes",
        params: {
            pageNum:params.pageNum,
            pageSize:params.pageSize,
            search:params.search,
        }
    })
}

export function selectAllClasses(params){
    return axios({
        method:"get",
        url:"/classes/selectAll",
        data:params
    })
}

export function queryClassById(params){
    return axios({
        method: "post",
        url: "/classes/queryClassById",
        data:params
    })
}